diff --git a/common/cmd_disk.c b/common/cmd_disk.c
index 8a1fda9..3025225 100644
--- a/common/cmd_disk.c
+++ b/common/cmd_disk.c
@@ -56,7 +56,7 @@
 	      ", Block Size: %ld\n",
 	      info.start, info.size, info.blksz);
 
-	if (dev_desc->block_read(dev, info.start, 1, (ulong *) addr) != 1) {
+	if (dev_desc->block_read(dev_desc, info.start, 1, (ulong *)addr) != 1) {
 		printf("** Read error on %d:%d\n", dev, part);
 		bootstage_error(BOOTSTAGE_ID_IDE_PART_READ);
 		return 1;
@@ -100,8 +100,8 @@
 	cnt /= info.blksz;
 	cnt -= 1;
 
-	if (dev_desc->block_read(dev, info.start + 1, cnt,
-					 (ulong *)(addr + info.blksz)) != cnt) {
+	if (dev_desc->block_read(dev_desc, info.start + 1, cnt,
+				 (ulong *)(addr + info.blksz)) != cnt) {
 		printf("** Read error on %d:%d\n", dev, part);
 		bootstage_error(BOOTSTAGE_ID_IDE_READ);
 		return 1;
diff --git a/common/cmd_ide.c b/common/cmd_ide.c
index ecd3e9d..f19a7ce 100644
--- a/common/cmd_ide.c
+++ b/common/cmd_ide.c
@@ -79,8 +79,8 @@
 
 #ifdef CONFIG_ATAPI
 static void	atapi_inquiry(block_dev_desc_t *dev_desc);
-static ulong atapi_read(int device, lbaint_t blknr, lbaint_t blkcnt,
-			void *buffer);
+static ulong atapi_read(block_dev_desc_t *block_dev, lbaint_t blknr,
+			lbaint_t blkcnt, void *buffer);
 #endif
 
 
@@ -187,6 +187,7 @@
 		if (strcmp(argv[1], "read") == 0) {
 			ulong addr = simple_strtoul(argv[2], NULL, 16);
 			ulong cnt = simple_strtoul(argv[4], NULL, 16);
+			block_dev_desc_t *dev_desc;
 			ulong n;
 
 #ifdef CONFIG_SYS_64BIT_LBA
@@ -201,9 +202,9 @@
 				curr_device, blk, cnt);
 #endif
 
-			n = ide_dev_desc[curr_device].block_read(curr_device,
-								 blk, cnt,
-								 (ulong *)addr);
+			dev_desc = &ide_dev_desc[curr_device];
+			n = dev_desc->block_read(dev_desc, blk, cnt,
+						 (ulong *)addr);
 			/* flush cache after read */
 			flush_cache(addr,
 				    cnt * ide_dev_desc[curr_device].blksz);
@@ -230,7 +231,8 @@
 			printf("\nIDE write: device %d block # %ld, count %ld ... ",
 				curr_device, blk, cnt);
 #endif
-			n = ide_write(curr_device, blk, cnt, (ulong *) addr);
+			n = ide_write(&ide_dev_desc[curr_device], blk, cnt,
+				      (ulong *)addr);
 
 			printf("%ld blocks written: %s\n",
 				n, (n == cnt) ? "OK" : "ERROR");
@@ -711,8 +713,10 @@
 
 /* ------------------------------------------------------------------------- */
 
-ulong ide_read(int device, lbaint_t blknr, lbaint_t blkcnt, void *buffer)
+ulong ide_read(block_dev_desc_t *block_dev, lbaint_t blknr, lbaint_t blkcnt,
+	       void *buffer)
 {
+	int device = block_dev->dev;
 	ulong n = 0;
 	unsigned char c;
 	unsigned char pwrsave = 0;	/* power save */
@@ -835,8 +839,10 @@
 /* ------------------------------------------------------------------------- */
 
 
-ulong ide_write(int device, lbaint_t blknr, lbaint_t blkcnt, const void *buffer)
+ulong ide_write(block_dev_desc_t *block_dev, lbaint_t blknr, lbaint_t blkcnt,
+		const void *buffer)
 {
+	int device = block_dev->dev;
 	ulong n = 0;
 	unsigned char c;
 
@@ -1388,8 +1394,10 @@
 #define ATAPI_READ_BLOCK_SIZE	2048	/* assuming CD part */
 #define ATAPI_READ_MAX_BLOCK	(ATAPI_READ_MAX_BYTES/ATAPI_READ_BLOCK_SIZE)
 
-ulong atapi_read(int device, lbaint_t blknr, lbaint_t blkcnt, void *buffer)
+ulong atapi_read(block_dev_desc_t *block_dev, lbaint_t blknr, lbaint_t blkcnt,
+		 void *buffer)
 {
+	int device = block_dev->dev;
 	ulong n = 0;
 	unsigned char ccb[12];	/* Command descriptor block */
 	ulong cnt;
diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c
index a6b7313..6b5c1ac 100644
--- a/common/cmd_mmc.c
+++ b/common/cmd_mmc.c
@@ -351,7 +351,7 @@
 	printf("\nMMC read: dev # %d, block # %d, count %d ... ",
 	       curr_device, blk, cnt);
 
-	n = mmc->block_dev.block_read(curr_device, blk, cnt, addr);
+	n = mmc->block_dev.block_read(&mmc->block_dev, blk, cnt, addr);
 	/* flush cache after read */
 	flush_cache((ulong)addr, cnt * 512); /* FIXME */
 	printf("%d blocks read: %s\n", n, (n == cnt) ? "OK" : "ERROR");
@@ -383,7 +383,7 @@
 		printf("Error: card is write protected!\n");
 		return CMD_RET_FAILURE;
 	}
-	n = mmc->block_dev.block_write(curr_device, blk, cnt, addr);
+	n = mmc->block_dev.block_write(&mmc->block_dev, blk, cnt, addr);
 	printf("%d blocks written: %s\n", n, (n == cnt) ? "OK" : "ERROR");
 
 	return (n == cnt) ? CMD_RET_SUCCESS : CMD_RET_FAILURE;
@@ -411,7 +411,7 @@
 		printf("Error: card is write protected!\n");
 		return CMD_RET_FAILURE;
 	}
-	n = mmc->block_dev.block_erase(curr_device, blk, cnt);
+	n = mmc->block_dev.block_erase(&mmc->block_dev, blk, cnt);
 	printf("%d blocks erased: %s\n", n, (n == cnt) ? "OK" : "ERROR");
 
 	return (n == cnt) ? CMD_RET_SUCCESS : CMD_RET_FAILURE;
diff --git a/common/cmd_read.c b/common/cmd_read.c
index f0fc9bf..8710288 100644
--- a/common/cmd_read.c
+++ b/common/cmd_read.c
@@ -66,7 +66,7 @@
 		return 1;
 	}
 
-	if (dev_desc->block_read(dev, offset + blk, cnt, addr) < 0) {
+	if (dev_desc->block_read(dev_desc, offset + blk, cnt, addr) < 0) {
 		printf("Error reading blocks\n");
 		return 1;
 	}
diff --git a/common/cmd_sata.c b/common/cmd_sata.c
index 51f6703..76bacea 100644
--- a/common/cmd_sata.c
+++ b/common/cmd_sata.c
@@ -18,6 +18,18 @@
 static int sata_curr_device = -1;
 block_dev_desc_t sata_dev_desc[CONFIG_SYS_SATA_MAX_DEVICE];
 
+static unsigned long sata_bread(block_dev_desc_t *block_dev, lbaint_t start,
+				lbaint_t blkcnt, void *dst)
+{
+	return sata_read(block_dev->dev, start, blkcnt, dst);
+}
+
+static unsigned long sata_bwrite(block_dev_desc_t *block_dev, lbaint_t start,
+				 lbaint_t blkcnt, const void *buffer)
+{
+	return sata_write(block_dev->dev, start, blkcnt, buffer);
+}
+
 int __sata_initialize(void)
 {
 	int rc;
@@ -32,8 +44,8 @@
 		sata_dev_desc[i].lba = 0;
 		sata_dev_desc[i].blksz = 512;
 		sata_dev_desc[i].log2blksz = LOG2(sata_dev_desc[i].blksz);
-		sata_dev_desc[i].block_read = sata_read;
-		sata_dev_desc[i].block_write = sata_write;
+		sata_dev_desc[i].block_read = sata_bread;
+		sata_dev_desc[i].block_write = sata_bwrite;
 
 		rc = init_sata(i);
 		if (!rc) {
diff --git a/common/cmd_scsi.c b/common/cmd_scsi.c
index 8695408..bc7d1b6 100644
--- a/common/cmd_scsi.c
+++ b/common/cmd_scsi.c
@@ -66,9 +66,9 @@
 
 static int scsi_read_capacity(ccb *pccb, lbaint_t *capacity,
 			      unsigned long *blksz);
-static ulong scsi_read(int device, lbaint_t blknr, lbaint_t blkcnt,
-		       void *buffer);
-static ulong scsi_write(int device, lbaint_t blknr,
+static ulong scsi_read(block_dev_desc_t *block_dev, lbaint_t blknr,
+		       lbaint_t blkcnt, void *buffer);
+static ulong scsi_write(block_dev_desc_t *block_dev, lbaint_t blknr,
 			lbaint_t blkcnt, const void *buffer);
 
 
@@ -346,7 +346,8 @@
 				ulong n;
 				printf ("\nSCSI read: device %d block # %ld, count %ld ... ",
 						scsi_curr_dev, blk, cnt);
-				n = scsi_read(scsi_curr_dev, blk, cnt, (ulong *)addr);
+				n = scsi_read(&scsi_dev_desc[scsi_curr_dev],
+					      blk, cnt, (ulong *)addr);
 				printf ("%ld blocks read: %s\n",n,(n==cnt) ? "OK" : "ERROR");
 				return 0;
 			} else if (strcmp(argv[1], "write") == 0) {
@@ -357,8 +358,8 @@
 				printf("\nSCSI write: device %d block # %ld, "
 				       "count %ld ... ",
 				       scsi_curr_dev, blk, cnt);
-				n = scsi_write(scsi_curr_dev, blk, cnt,
-					       (ulong *)addr);
+				n = scsi_write(&scsi_dev_desc[scsi_curr_dev],
+					       blk, cnt, (ulong *)addr);
 				printf("%ld blocks written: %s\n", n,
 				       (n == cnt) ? "OK" : "ERROR");
 				return 0;
@@ -375,9 +376,10 @@
 #define SCSI_MAX_READ_BLK 0xFFFF
 #define SCSI_LBA48_READ	0xFFFFFFF
 
-static ulong scsi_read(int device, lbaint_t blknr, lbaint_t blkcnt,
-		       void *buffer)
+static ulong scsi_read(block_dev_desc_t *block_dev, lbaint_t blknr,
+		       lbaint_t blkcnt, void *buffer)
 {
+	int device = block_dev->dev;
 	lbaint_t start, blks;
 	uintptr_t buf_addr;
 	unsigned short smallblks = 0;
@@ -441,9 +443,10 @@
 /* Almost the maximum amount of the scsi_ext command.. */
 #define SCSI_MAX_WRITE_BLK 0xFFFF
 
-static ulong scsi_write(int device, lbaint_t blknr,
+static ulong scsi_write(block_dev_desc_t *block_dev, lbaint_t blknr,
 			lbaint_t blkcnt, const void *buffer)
 {
+	int device = block_dev->dev;
 	lbaint_t start, blks;
 	uintptr_t buf_addr;
 	unsigned short smallblks;
diff --git a/common/cmd_usb.c b/common/cmd_usb.c
index a540b42..c7b642c 100644
--- a/common/cmd_usb.c
+++ b/common/cmd_usb.c
@@ -759,7 +759,7 @@
 			printf("\nUSB read: device %d block # %ld, count %ld"
 				" ... ", usb_stor_curr_dev, blk, cnt);
 			stor_dev = usb_stor_get_dev(usb_stor_curr_dev);
-			n = stor_dev->block_read(usb_stor_curr_dev, blk, cnt,
+			n = stor_dev->block_read(stor_dev, blk, cnt,
 						 (ulong *)addr);
 			printf("%ld blocks read: %s\n", n,
 				(n == cnt) ? "OK" : "ERROR");
@@ -781,7 +781,7 @@
 			printf("\nUSB write: device %d block # %ld, count %ld"
 				" ... ", usb_stor_curr_dev, blk, cnt);
 			stor_dev = usb_stor_get_dev(usb_stor_curr_dev);
-			n = stor_dev->block_write(usb_stor_curr_dev, blk, cnt,
+			n = stor_dev->block_write(stor_dev, blk, cnt,
 						(ulong *)addr);
 			printf("%ld blocks write: %s\n", n,
 				(n == cnt) ? "OK" : "ERROR");
diff --git a/common/cmd_usb_mass_storage.c b/common/cmd_usb_mass_storage.c
index 0407389..f4bafec 100644
--- a/common/cmd_usb_mass_storage.c
+++ b/common/cmd_usb_mass_storage.c
@@ -19,9 +19,8 @@
 {
 	block_dev_desc_t *block_dev = ums_dev->block_dev;
 	lbaint_t blkstart = start + ums_dev->start_sector;
-	int dev_num = block_dev->dev;
 
-	return block_dev->block_read(dev_num, blkstart, blkcnt, buf);
+	return block_dev->block_read(block_dev, blkstart, blkcnt, buf);
 }
 
 static int ums_write_sector(struct ums *ums_dev,
@@ -29,9 +28,8 @@
 {
 	block_dev_desc_t *block_dev = ums_dev->block_dev;
 	lbaint_t blkstart = start + ums_dev->start_sector;
-	int dev_num = block_dev->dev;
 
-	return block_dev->block_write(dev_num, blkstart, blkcnt, buf);
+	return block_dev->block_write(block_dev, blkstart, blkcnt, buf);
 }
 
 static struct ums ums_dev = {
diff --git a/common/env_mmc.c b/common/env_mmc.c
index 9639822..f182749 100644
--- a/common/env_mmc.c
+++ b/common/env_mmc.c
@@ -127,7 +127,7 @@
 	blk_start	= ALIGN(offset, mmc->write_bl_len) / mmc->write_bl_len;
 	blk_cnt		= ALIGN(size, mmc->write_bl_len) / mmc->write_bl_len;
 
-	n = mmc->block_dev.block_write(CONFIG_SYS_MMC_ENV_DEV, blk_start,
+	n = mmc->block_dev.block_write(&mmc->block_dev, blk_start,
 					blk_cnt, (u_char *)buffer);
 
 	return (n == blk_cnt) ? 0 : -1;
@@ -192,16 +192,12 @@
 			   unsigned long offset, const void *buffer)
 {
 	uint blk_start, blk_cnt, n;
-	int dev = CONFIG_SYS_MMC_ENV_DEV;
-
-#ifdef CONFIG_SPL_BUILD
-	dev = 0;
-#endif
 
 	blk_start	= ALIGN(offset, mmc->read_bl_len) / mmc->read_bl_len;
 	blk_cnt		= ALIGN(size, mmc->read_bl_len) / mmc->read_bl_len;
 
-	n = mmc->block_dev.block_read(dev, blk_start, blk_cnt, (uchar *)buffer);
+	n = mmc->block_dev.block_read(&mmc->block_dev, blk_start, blk_cnt,
+				      (uchar *)buffer);
 
 	return (n == blk_cnt) ? 0 : -1;
 }
diff --git a/common/fb_mmc.c b/common/fb_mmc.c
index b480e76..6e742da 100644
--- a/common/fb_mmc.c
+++ b/common/fb_mmc.c
@@ -58,7 +58,7 @@
 	block_dev_desc_t *dev_desc = sparse->dev_desc;
 	int ret;
 
-	ret = dev_desc->block_write(dev_desc->dev, offset, size, data);
+	ret = dev_desc->block_write(dev_desc, offset, size, data);
 	if (!ret)
 		return -EIO;
 
@@ -84,8 +84,7 @@
 
 	puts("Flashing Raw Image\n");
 
-	blks = dev_desc->block_write(dev_desc->dev, info->start, blkcnt,
-				     buffer);
+	blks = dev_desc->block_write(dev_desc, info->start, blkcnt, buffer);
 	if (blks != blkcnt) {
 		error("failed writing to device %d\n", dev_desc->dev);
 		fastboot_fail(response_str, "failed writing to device");
@@ -206,7 +205,7 @@
 	printf("Erasing blocks " LBAFU " to " LBAFU " due to alignment\n",
 	       blks_start, blks_start + blks_size);
 
-	blks = dev_desc->block_erase(dev_desc->dev, blks_start, blks_size);
+	blks = dev_desc->block_erase(dev_desc, blks_start, blks_size);
 	if (blks != blks_size) {
 		error("failed erasing from device %d", dev_desc->dev);
 		fastboot_fail(response_str, "failed erasing from device");
diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index c1c29c0..c3931c6 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -23,13 +23,12 @@
 	unsigned long count;
 	u32 image_size_sectors;
 	struct image_header *header;
-	int dev_num = mmc->block_dev.dev;
 
 	header = (struct image_header *)(CONFIG_SYS_TEXT_BASE -
 					 sizeof(struct image_header));
 
 	/* read image header to find the image size & load address */
-	count = mmc->block_dev.block_read(dev_num, sector, 1, header);
+	count = mmc->block_dev.block_read(&mmc->block_dev, sector, 1, header);
 	debug("read sector %lx, count=%lu\n", sector, count);
 	if (count == 0)
 		goto end;
@@ -46,7 +45,8 @@
 			     mmc->read_bl_len;
 
 	/* Read the header too to avoid extra memcpy */
-	count = mmc->block_dev.block_read(dev_num, sector, image_size_sectors,
+	count = mmc->block_dev.block_read(&mmc->block_dev, sector,
+					  image_size_sectors,
 					  (void *)(ulong)spl_image.load_addr);
 	debug("read %x sectors to %x\n", image_size_sectors,
 	      spl_image.load_addr);
@@ -150,8 +150,7 @@
 {
 	unsigned long count;
 
-	count = mmc->block_dev.block_read(
-		mmc->block_dev.dev,
+	count = mmc->block_dev.block_read(&mmc->block_dev,
 		CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR,
 		CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS,
 		(void *) CONFIG_SYS_SPL_ARGS_ADDR);
diff --git a/common/usb_storage.c b/common/usb_storage.c
index e61a8c8..4fdb55f 100644
--- a/common/usb_storage.c
+++ b/common/usb_storage.c
@@ -119,10 +119,10 @@
 		      block_dev_desc_t *dev_desc);
 int usb_storage_probe(struct usb_device *dev, unsigned int ifnum,
 		      struct us_data *ss);
-unsigned long usb_stor_read(int device, lbaint_t blknr,
-			    lbaint_t blkcnt, void *buffer);
-unsigned long usb_stor_write(int device, lbaint_t blknr,
-			     lbaint_t blkcnt, const void *buffer);
+static unsigned long usb_stor_read(block_dev_desc_t *block_dev, lbaint_t blknr,
+				   lbaint_t blkcnt, void *buffer);
+static unsigned long usb_stor_write(block_dev_desc_t *block_dev, lbaint_t blknr,
+				    lbaint_t blkcnt, const void *buffer);
 void uhci_show_temp_int_td(void);
 
 #ifdef CONFIG_PARTITIONS
@@ -1027,9 +1027,10 @@
 }
 #endif /* CONFIG_USB_BIN_FIXUP */
 
-unsigned long usb_stor_read(int device, lbaint_t blknr,
-			    lbaint_t blkcnt, void *buffer)
+static unsigned long usb_stor_read(block_dev_desc_t *block_dev, lbaint_t blknr,
+				   lbaint_t blkcnt, void *buffer)
 {
+	int device = block_dev->dev;
 	lbaint_t start, blks;
 	uintptr_t buf_addr;
 	unsigned short smallblks;
@@ -1097,9 +1098,10 @@
 	return blkcnt;
 }
 
-unsigned long usb_stor_write(int device, lbaint_t blknr,
-				lbaint_t blkcnt, const void *buffer)
+static unsigned long usb_stor_write(block_dev_desc_t *block_dev, lbaint_t blknr,
+				    lbaint_t blkcnt, const void *buffer)
 {
+	int device = block_dev->dev;
 	lbaint_t start, blks;
 	uintptr_t buf_addr;
 	unsigned short smallblks;
